#ifndef PLR_H_
#define PLR_H_

#include "recbase.h"
#include "rectype.h"
#include "stdffield.h"
#include <vector>
#include <string>

namespace opsrc { 
    namespace stdf {

        class Plr : public RecBase
        {
        public:
            Plr(stdf_rec stdfrec,  int reclen, std::ios::pos_type fileRecFirstBytePosition, int orderindex, endian e, char* buf);
            virtual ~Plr();

            const StdfField<int> getGroupCount() const;
            void setGroupCount(StdfField<int> grpcnt);

            const StdfField<vector<unsigned int> > getGroupIndex() const;
            void setGroupIndex(StdfField<vector<unsigned int> > grpindx);

            const StdfField<vector<unsigned int> > getGroupMode() const;
            void setGroupMode(StdfField<vector<unsigned int> > grpmode);

            const StdfField<vector<unsigned int> > getGroupDisplayRadix() const;
            void setGroupDisplayRadix(StdfField<vector<unsigned int> > grpradx);

            const StdfField<vector<string> > getProgramStateEncodeChars() const;
            void setProgramStateEncodeChars(StdfField<vector<string> > pgmchar);

            const StdfField<vector<string> > getReturnStateStateEncodeChars() const;
            void setReturnStateEncodeChars(StdfField<vector<string> > rtnchar);

            const StdfField<vector<string> > getProgramStateStateEncodeCharsL() const;
            void setProgamStateEncodeCharsL(StdfField<vector<string> > pgmchal);

            const StdfField<vector<string> > getReturnStateStateEncodeCharsL() const;
            void setReturnStateEncodeCharsL(StdfField<vector<string> > rtnchal);

            void readFields(char *buf);

        protected:
            Plr();

        private:
            StdfField<int> grp_cnt;
            StdfField<vector<unsigned int> > grp_indx;
            StdfField<vector<unsigned int> > grp_mode;
            StdfField<vector<unsigned int> > grp_radx;
            StdfField<vector<string> > pgm_char;
            StdfField<vector<string> > rtn_char;
            StdfField<vector<string> > pgm_chal;
            StdfField<vector<string> > rtn_chal;
            endian en;
            bool decodeFields;

        };

    }
}

#endif /*PLR_H_*/
